package ui.activity;

import com.stuassist.ui.R;

import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.app.Activity;
import android.content.Intent;


public class Take_in extends Activity {
	private Button takein_back ; //返回按钮
	private Button takein_ok ; //返回按钮
	private Button takein_cancel ; //返回按钮	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		super.setContentView(R.layout.take_in);  // 加载视图
		
		this.takein_back =(Button)findViewById(R.id.takein_back); //获取相关控件的ID号	
		this.takein_back.setOnClickListener(new OnClickListener(){
	@Override
		    public void onClick(View view) {
			Intent intent = new Intent(Take_in.this,MainActivity.class);
			startActivity(intent);}
	      });  //返回按钮事件的响应
		
	this.takein_ok =(Button)findViewById(R.id.takein_ok);
	this.takein_ok.setOnClickListener(new OnClickListener(){
		@Override
			    public void onClick(View view) {
				Intent intent = new Intent(Take_in.this,MainActivity.class);
				startActivity(intent);}
		      });  //确定按钮事件的响应
	
	this.takein_cancel =(Button)findViewById(R.id.takein_cancel);
	this.takein_cancel.setOnClickListener(new OnClickListener(){
		@Override
			    public void onClick(View view) {
				Intent intent = new Intent(Take_in.this,MainActivity.class);
				startActivity(intent);}
		      });  //取消按钮事件的响应
	} 

	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if(keyCode == KeyEvent.KEYCODE_BACK){
			Take_in.this.finish();
			Intent intent = new Intent(Take_in.this,MainActivity.class);
			startActivity(intent);
		}
		return false;
	}
}
	


